<?php
namespace Home\Controller;

use Think\Controller;

class IndexController extends Controller {
    public function index(){

    	$sql = "UPDATE `user` SET `index` = `index`+'1' where `id` = '{$_SESSION['id']}'";
		$modle = M('user');

		$result = $modle -> execute($sql);

		$sql = "SELECT `index` from `user` where `id` = '{$_SESSION['id']}'";

		$result = $modle -> query($sql);

		$_SESSION['index'] = $result[0]['index'];	


		$this->display();
	
    }
}


?>